package com.evil.common.application.dto.pkg;

import com.evil.common.application.dto.SourcesDTO;
import com.evil.common.application.enums.ApplicationSourceTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Collection;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PackageApplicationSourcesDTO extends SourcesDTO {

    private Boolean filterDeleted;

    public PackageApplicationSourcesDTO() {
        this.filterDeleted = true;
    }

    public PackageApplicationSourcesDTO(SourcesDTO sourcesDTO) {
        super(sourcesDTO.getSourceType(), sourcesDTO.getSourceIds());
        this.filterDeleted = true;
    }

    public PackageApplicationSourcesDTO(ApplicationSourceTypeEnum sourceTypeEnum, Collection<Long> sourceIds) {
        super(sourceTypeEnum.getId(), sourceIds);
        this.filterDeleted = true;
    }
}
